package com.itbaizhan.paymentdemo.service;

import com.itbaizhan.paymentdemo.vo.BaseResult;

import java.io.IOException;
import java.security.GeneralSecurityException;
import java.util.HashMap;
import java.util.Map;

/*微信支付接口*/
public interface IWxPaymentService {

    /**
     * 根据订单编号进行native下单   code_url
     * @param orderNo
     * @return
     */
    BaseResult nativePay(String orderNo) throws IOException;

    //修改订单状态接口
    void updateOrderStatus(HashMap<String,Object> bodyMap) throws GeneralSecurityException;

    //根据订单编号查询订单信息
    String queryOrder(String orderNo) throws IOException;

    //检查订单状态
    void checkOrderStatus(String orderNo) throws IOException;

    //关闭订单
    void cancelOrderNo(String orderNo) throws IOException;

    /**
     * 退款
     * @param orderNo  退款编号
     * @param reason  退款理由
     */
    void refund(String orderNo,String reason) throws IOException;

    //处理退款
    void processRefunds(Map<String,Object> resultMap) throws GeneralSecurityException;
}
